<template>
  <div class="admin_index">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>开发者认证</span>
        <!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button> -->
      </div>
      <div class="user_info">
        <el-form ref="form" :model="form" label-position="right" label-width="220px">
          <el-form-item label="认证状态">
            <!-- <span>未认证</span> -->
            <el-tag type="danger">未认证</el-tag>
          </el-form-item>
          <el-form-item label="真实姓名" required>
            <el-input v-model="form.name" placeholder="请填写真实姓名"></el-input>
          </el-form-item>
          <el-form-item label="证件类型" required>
            <el-select v-model="form.name" placeholder="请选择">
              <el-option key='1' label="身份证" value='idcard'></el-option>
              <el-option key='1' label="护照" value='passport'></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="证件号码" required>
            <el-input v-model="form.name" placeholder="请填写证件号码"></el-input>
          </el-form-item>
          <!-- <el-form-item label="所在地区" required>
            <el-cascader
              placeholder="请选择所在地区"
              :options="options"
              v-model="selectedOptions"
              @change="handleChange"
            ></el-cascader>
          </el-form-item> -->
          <el-form-item label="详细地址" required>
            <el-input v-model="form.name" placeholder="请填写详细地址"></el-input>
          </el-form-item>
       
          <el-form-item label="联系手机" required>
            <el-input v-model="form.name" placeholder="请填写联系人手机"></el-input>
          </el-form-item>
          <el-form-item label="联系邮箱">
            <el-input v-model="form.name" placeholder="请填写联系邮箱"></el-input>
          </el-form-item>
          <el-form-item label="手持身份证（人面像）" required>
            <div class="photo_item">
              <el-upload
                class="avatar-uploader"
                action="https://jsonplaceholder.typicode.com/posts/"
                :show-file-list="false"
              >
                <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>
              <div class="info_value tip">保持证件信息都清晰可见，支持jpg，png格式，内容大小不超过8M</div>
            </div>
          </el-form-item>
          <el-form-item label="身份证描描件（人像面）" required>
            <div class="photo_item">
              <el-upload
                class="avatar-uploader"
                action="https://jsonplaceholder.typicode.com/posts/"
                :show-file-list="false"
              >
                <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>
              <div class="info_value tip">保持证件信息都清晰可见，支持jpg，png格式，内容大小不超过8M</div>
            </div>
          </el-form-item>
          <el-form-item label="身份证描描件（国徽面）" required>
            <div class="photo_item">
              <el-upload
                class="avatar-uploader"
                action="https://jsonplaceholder.typicode.com/posts/"
                :show-file-list="false"
              >
                <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>
              <div class="info_value tip">保持证件信息都清晰可见，支持jpg，png格式，内容大小不超过8M</div>
            </div>
          </el-form-item>

          <el-form-item>
            <el-button type="primary" @click="onSubmit">立即提交</el-button>
            <!-- <el-button>取消</el-button> -->
          </el-form-item>
        </el-form>
      </div>
    </el-card>
  </div>
</template>

<script>
import { regionData } from "element-china-area-data";
export default {
  data() {
    return {
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      },
      options: regionData,
      selectedOptions: []
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
    handleChange(value) {
      console.log(value);
    }
  }
};
</script>

<style lang="less" scoped>
.admin_index {
  padding: 20px;
}
.tip {
  color: #999;
  font-size: 14px;
}
.user_info {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 260px 0 180px;
  .info_item {
    min-width: 400px;
    display: flex;
    align-items: baseline;
    padding: 10px 0;

    .info_left {
      font-size: 16px;
      margin-right: 10px;
    }
    .change {
      transform: translateY(-2px);
      margin-left: 20px;
    }
  }
  .upload {
    align-items: center;
  }
}
/deep/.avatar-uploader .el-upload {
  border: 1px dashed #ccc;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin-right: 10px;
}
/deep/.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
/deep/.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 180px;
  height: 180px;
  line-height: 180px;
  text-align: center;
}
.avatar {
  width: 180px;
  height: 180px;
  display: block;
}
.photo_item {
  display: flex;
  align-items: center;
}
</style>